import { getImsInventoryPlan } from '@/api/modules/in-work'
import { showModal } from '@/hooks'

export async function useDoingInventory(content) {
  const res = await getImsInventoryPlan({
    status: 2,
  })

  if (res.data) {
    showModal({
      title: '温馨提示',
      content,
      showCancelButton: false,
      confirmText: '我知道了',
      slot: true,
      confirm: () => {
        uni.navigateBack({
          delta: 1,
        })
      },
    })
    return Promise.reject('禁止创建')
  }
}
